<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>树洞广场 - 发现心声</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        :root {
            --primary: #4A6FFF;
            --primary-light: #E8EEFF;
            --secondary: #FF6B6B;
            --dark: #2D3436;
            --gray: #636E72;
            --light-gray: #F1F5F8;
            --border: #DFE6E9;
            --radius: 8px;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            color: var(--dark);
            background-color: #F8FAFC;
            line-height: 1.6;
            padding-top: 1.5rem;
            padding-bottom: 3rem;
        }
        
        .container {
            max-width: 1280px;
        }
        
        .page-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--dark);
        }
        
        /* 筛选区域样式 */
        .filter-container {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .search-box {
            position: relative;
            margin-bottom: 1.5rem;
        }
        
        .search-input {
            width: 100%;
            padding: 0.8rem 1rem 0.8rem 2.75rem;
            border: 1px solid var(--border);
            border-radius: 30px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(74, 111, 255, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray);
        }
        
        .filter-section {
            margin-bottom: 1.5rem;
        }
        
        .filter-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .filter-tag {
            padding: 0.4rem 1rem;
            border-radius: 20px;
            background-color: var(--light-gray);
            color: var(--dark);
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }
        
        .filter-tag:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        .filter-tag.active {
            background-color: var(--primary);
            color: white;
        }
        
        .filter-row {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            margin-bottom: 1rem;
        }
        
        .filter-col {
            flex: 1;
            min-width: 200px;
        }
        
        .form-select {
            width: 100%;
            padding: 0.6rem 1rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background-color: white;
            font-size: 0.95rem;
        }
        
        .form-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(74, 111, 255, 0.1);
            outline: none;
        }
        
        .filter-actions {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .btn {
            padding: 0.6rem 1.25rem;
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .btn-primary {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .btn-primary:hover {
            background-color: #3A5FE8;
        }
        
        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--border);
            color: var(--dark);
        }
        
        .btn-outline:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        /* 结果区域样式 */
        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .results-count {
            color: var(--gray);
            font-size: 0.95rem;
        }
        
        .sort-options {
            display: flex;
            gap: 1rem;
        }
        
        .sort-option {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            color: var(--gray);
            cursor: pointer;
            font-size: 0.95rem;
        }
        
        .sort-option.active {
            color: var(--primary);
            font-weight: 500;
        }
        
        /* 树洞列表样式 */
        .treehole-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .treehole-card {
            background-color: white;
            border-radius: var(--radius);
            border: 1px solid var(--border);
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .treehole-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
        }
        
        .card-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        .no-image {
            height: 60px;
            background-color: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gray);
        }
        
        .card-content {
            padding: 1.25rem;
        }
        
        .card-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
        }
        
        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .user-info {
            flex: 1;
        }
        
        .user-name {
            font-weight: 600;
            font-size: 0.9rem;
        }
        
        .post-time {
            font-size: 0.8rem;
            color: var(--gray);
        }
        
        .card-text {
            margin-bottom: 1rem;
            font-size: 0.95rem;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.6;
        }
        
        .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 0.75rem;
            border-top: 1px solid var(--border);
            font-size: 0.85rem;
            color: var(--gray);
        }
        
        .card-stats {
            display: flex;
            gap: 1rem;
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .card-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .action-btn {
            color: var(--gray);
            background: none;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .action-btn:hover {
            color: var(--primary);
        }
        
        /* 活跃标签样式 */
        .active-tag {
            display: inline-block;
            padding: 0.2rem 0.5rem;
            background-color: var(--primary-light);
            color: var(--primary);
            border-radius: 4px;
            font-size: 0.75rem;
            margin-right: 0.5rem;
        }
        
        /* 分页样式 */
        .pagination-container {
            display: flex;
            justify-content: center;
            margin-top: 2rem;
        }
        
        .pagination {
            display: flex;
            gap: 0.5rem;
        }
        
        .page-item {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.95rem;
        }
        
        .page-item:not(.active):not(.disabled):hover {
            background-color: var(--light-gray);
            color: var(--primary);
        }
        
        .page-item.active {
            background-color: var(--primary);
            color: white;
        }
        
        .page-item.disabled {
            color: var(--border);
            cursor: not-allowed;
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .treehole-list {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }
        
        @media (max-width: 768px) {
            .filter-row {
                gap: 1rem;
            }
            
            .filter-col {
                min-width: 100%;
            }
            
            .filter-actions {
                flex-wrap: wrap;
                justify-content: center;
            }
            
            .results-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.75rem;
            }
            
            .treehole-list {
                grid-template-columns: 1fr;
            }
        }
        
        @media (max-width: 576px) {
            .page-title {
                font-size: 1.5rem;
            }
            
            .filter-options {
                gap: 0.5rem;
            }
            
            .filter-tag {
                padding: 0.35rem 0.75rem;
                font-size: 0.85rem;
            }
            
            .btn {
                padding: 0.5rem 1rem;
                font-size: 0.9rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1 class="page-title">树洞广场</h1>
        
        <!-- 筛选查询区域 -->
        <div class="filter-container">
            <!-- 搜索框 -->
            <div class="search-box">
                <i class="fas fa-search search-icon"></i>
                <input type="text" class="search-input" placeholder="搜索树洞内容、标签或用户...">
            </div>
            
            <!-- 标签筛选 -->
            <div class="filter-section">
                <div class="filter-title">
                    <i class="fas fa-tags"></i> 热门标签
                </div>
                <div class="filter-options">
                    <div class="filter-tag active">全部标签</div>
                    <div class="filter-tag">情感</div>
                    <div class="filter-tag">职场</div>
                    <div class="filter-tag">生活</div>
                    <div class="filter-tag">学习</div>
                    <div class="filter-tag">工作</div>
                    <div class="filter-tag">家庭</div>
                    <div class="filter-tag">旅行</div>
                    <div class="filter-tag">美食</div>
                    <div class="filter-tag">电影</div>
                    <div class="filter-tag">音乐</div>
                    <div class="filter-tag">宠物</div>
                </div>
            </div>
            
            <div class="filter-row">
                <!-- 内容类型筛选 -->
                <div class="filter-col">
                    <div class="filter-title">
                        <i class="fas fa-file-alt"></i> 内容类型
                    </div>
                    <select class="form-select">
                        <option value="all">全部内容</option>
                        <option value="text">纯文字</option>
                        <option value="image">含图片</option>
                        <option value="video">含视频</option>
                    </select>
                </div>
                
                <!-- 时间筛选 -->
                <div class="filter-col">
                    <div class="filter-title">
                        <i class="fas fa-clock"></i> 发布时间
                    </div>
                    <select class="form-select">
                        <option value="all">全部时间</option>
                        <option value="today">今天</option>
                        <option value="week">本周</option>
                        <option value="month">本月</option>
                        <option value="quarter">近三个月</option>
                        <option value="year">今年</option>
                    </select>
                </div>
                
                <!-- 热度筛选 -->
                <div class="filter-col">
                    <div class="filter-title">
                        <i class="fas fa-fire"></i> 热度筛选
                    </div>
                    <select class="form-select">
                        <option value="all">全部热度</option>
                        <option value="hot">热门</option>
                        <option value="new">最新</option>
                        <option value="discussed">热议</option>
                        <option value="popular">点赞较多</option>
                    </select>
                </div>
                
                <!-- 隐私筛选 -->
                <div class="filter-col">
                    <div class="filter-title">
                        <i class="fas fa-eye"></i> 可见范围
                    </div>
                    <select class="form-select">
                        <option value="all">全部可见</option>
                        <option value="public">公开</option>
                        <option value="friends">仅好友可见</option>
                        <option value="anonymous">匿名发布</option>
                    </select>
                </div>
            </div>
            
            <!-- 更多筛选选项 -->
            <div class="filter-section">
                <div class="filter-title">
                    <i class="fas fa-filter"></i> 更多筛选
                </div>
                <div class="filter-options">
                    <div class="filter-tag">有图片</div>
                    <div class="filter-tag">有视频</div>
                    <div class="filter-tag">有音乐</div>
                    <div class="filter-tag">匿名发布</div>
                    <div class="filter-tag">带话题</div>
                    <div class="filter-tag">有投票</div>
                    <div class="filter-tag">有活动</div>
                </div>
            </div>
            
            <!-- 筛选操作按钮 -->
            <div class="filter-actions">
                <button class="btn btn-outline">
                    <i class="fas fa-redo"></i> 重置筛选
                </button>
                <button class="btn btn-primary">
                    <i class="fas fa-search"></i> 应用筛选
                </button>
            </div>
        </div>
        
        <!-- 结果展示区域 -->
        <div class="results-header">
            <div class="results-count">找到 <strong>1,286</strong> 个符合条件的树洞</div>
            
            <div class="sort-options">
                <div class="sort-option active">
                    <i class="fas fa-sort-amount-down"></i> 推荐排序
                </div>
                <div class="sort-option">
                    <i class="fas fa-clock"></i> 最新发布
                </div>
                <div class="sort-option">
                    <i class="fas fa-comment"></i> 评论最多
                </div>
                <div class="sort-option">
                    <i class="fas fa-heart"></i> 点赞最多
                </div>
            </div>
        </div>
        
        <!-- 树洞列表 -->
        <div class="treehole-list">
            <!-- 树洞1 - 带图 -->
            <div class="treehole-card">
                <img src="https://picsum.photos/seed/tree1/600/400" alt="城市夜景" class="card-image">
                <div class="card-content">
                    <div class="card-header">
                        <img src="https://picsum.photos/seed/user1/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">
                                <span class="active-tag">活跃</span>城市夜行者
                            </div>
                            <div class="post-time">2小时前</div>
                        </div>
                    </div>
                    <div class="card-text">
                        加班到深夜，看着窗外的城市灯火，突然觉得每个人都在为生活努力奋斗，虽然辛苦，但也充满希望。
                    </div>
                    <div class="card-footer">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="far fa-eye"></i> 342
                            </div>
                            <div class="stat-item">
                                <i class="far fa-comment"></i> 28
                            </div>
                            <div class="stat-item">
                                <i class="far fa-heart"></i> 89
                            </div>
                        </div>
                        <div class="card-actions">
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-share-alt"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 树洞2 - 无图 -->
            <div class="treehole-card">
                <div class="no-image">
                    <i class="fas fa-align-left"></i>
                </div>
                <div class="card-content">
                    <div class="card-header">
                        <img src="https://picsum.photos/seed/user2/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">匿名用户</div>
                            <div class="post-time">5小时前</div>
                        </div>
                    </div>
                    <div class="card-text">
                        今天和最好的朋友吵架了，不知道该怎么和好。我们认识十年了，第一次吵得这么凶，感觉心里好难受。
                    </div>
                    <div class="card-footer">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="far fa-eye"></i> 567
                            </div>
                            <div class="stat-item">
                                <i class="far fa-comment"></i> 42
                            </div>
                            <div class="stat-item">
                                <i class="far fa-heart"></i> 124
                            </div>
                        </div>
                        <div class="card-actions">
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-share-alt"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 树洞3 - 带图 -->
            <div class="treehole-card">
                <img src="https://picsum.photos/seed/tree3/600/400" alt="旅行风景" class="card-image">
                <div class="card-content">
                    <div class="card-header">
                        <img src="https://picsum.photos/seed/user3/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">旅行者日记</div>
                            <div class="post-time">昨天 18:32</div>
                        </div>
                    </div>
                    <div class="card-text">
                        偶然发现的小众旅行地，没有太多游客，只有大自然的声音。有时候远离喧嚣，才能找到内心的平静。
                    </div>
                    <div class="card-footer">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="far fa-eye"></i> 1254
                            </div>
                            <div class="stat-item">
                                <i class="far fa-comment"></i> 87
                            </div>
                            <div class="stat-item">
                                <i class="far fa-heart"></i> 342
                            </div>
                        </div>
                        <div class="card-actions">
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-share-alt"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 树洞4 - 带图 -->
            <div class="treehole-card">
                <img src="https://picsum.photos/seed/tree4/600/400" alt="美食照片" class="card-image">
                <div class="card-content">
                    <div class="card-header">
                        <img src="https://picsum.photos/seed/user4/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">
                                <span class="active-tag">活跃</span>美食爱好者
                            </div>
                            <div class="post-time">2天前</div>
                        </div>
                    </div>
                    <div class="card-text">
                        周末尝试做了红烧肉，第一次做居然成功了！味道还不错，自己做饭的感觉真好，比外卖健康多了。
                    </div>
                    <div class="card-footer">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="far fa-eye"></i> 876
                            </div>
                            <div class="stat-item">
                                <i class="far fa-comment"></i> 56
                            </div>
                            <div class="stat-item">
                                <i class="far fa-heart"></i> 231
                            </div>
                        </div>
                        <div class="card-actions">
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-share-alt"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 树洞5 - 无图 -->
            <div class="treehole-card">
                <div class="no-image">
                    <i class="fas fa-align-left"></i>
                </div>
                <div class="card-content">
                    <div class="card-header">
                        <img src="https://picsum.photos/seed/user5/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">职场新人</div>
                            <div class="post-time">3天前</div>
                        </div>
                    </div>
                    <div class="card-text">
                        刚入职一个月，感觉压力好大，很多东西都不会，又不敢问同事，怕他们觉得我笨。每天都很焦虑，不知道该怎么办。
                    </div>
                    <div class="card-footer">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="far fa-eye"></i> 987
                            </div>
                            <div class="stat-item">
                                <i class="far fa-comment"></i> 103
                            </div>
                            <div class="stat-item">
                                <i class="far fa-heart"></i> 276
                            </div>
                        </div>
                        <div class="card-actions">
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-share-alt"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 树洞6 - 带图 -->
            <div class="treehole-card">
                <img src="https://picsum.photos/seed/tree6/600/400" alt="宠物照片" class="card-image">
                <div class="card-content">
                    <div class="card-header">
                        <img src="https://picsum.photos/seed/user6/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-info">
                            <div class="user-name">铲屎官日常</div>
                            <div class="post-time">4天前</div>
                        </div>
                    </div>
                    <div class="card-text">
                        我家猫咪今天特别粘人，平时都很高冷的。是不是知道我心情不好，特意来安慰我呢？有宠物陪伴真的很治愈。
                    </div>
                    <div class="card-footer">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="far fa-eye"></i> 1567
                            </div>
                            <div class="stat-item">
                                <i class="far fa-comment"></i> 98
                            </div>
                            <div class="stat-item">
                                <i class="far fa-heart"></i> 543
                            </div>
                        </div>
                        <div class="card-actions">
                            <button class="action-btn">
                                <i class="far fa-bookmark"></i>
                            </button>
                            <button class="action-btn">
                                <i class="far fa-share-alt"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 分页 -->
        <div class="pagination-container">
            <div class="pagination">
                <div class="page-item disabled">
                    <i class="fas fa-chevron-left"></i>
                </div>
                <div class="page-item active">1</div>
                <div class="page-item">2</div>
                <div class="page-item">3</div>
                <div class="page-item">4</div>
                <div class="page-item">5</div>
                <div class="page-item">...</div>
                <div class="page-item">129</div>
                <div class="page-item">
                    <i class="fas fa-chevron-right"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- Bootstrap 5 JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 标签筛选功能
            const filterTags = document.querySelectorAll('.filter-tag');
            
            filterTags.forEach(tag => {
                tag.addEventListener('click', function() {
                    // 如果是"全部标签"，取消其他所有标签的选中状态
                    if (this.textContent === '全部标签') {
                        filterTags.forEach(t => t.classList.remove('active'));
                        this.classList.add('active');
                    } else {
                        // 取消"全部标签"的选中状态
                        filterTags.forEach(t => {
                            if (t.textContent === '全部标签') {
                                t.classList.remove('active');
                            }
                        });
                        // 切换当前标签的选中状态
                        this.classList.toggle('active');
                    }
                });
            });
            
            // 排序选项功能
            const sortOptions = document.querySelectorAll('.sort-option');
            
            sortOptions.forEach(option => {
                option.addEventListener('click', function() {
                    sortOptions.forEach(o => o.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 分页功能
            const pageItems = document.querySelectorAll('.page-item:not(.disabled)');
            
            pageItems.forEach(item => {
                if (!item.classList.contains('disabled')) {
                    item.addEventListener('click', function() {
                        if (!this.innerHTML.includes('chevron')) { // 不是箭头按钮
                            pageItems.forEach(i => i.classList.remove('active'));
                            this.classList.add('active');
                        }
                    });
                }
            });
            
            // 重置筛选按钮
            document.querySelector('.btn-outline').addEventListener('click', function() {
                // 重置搜索框
                document.querySelector('.search-input').value = '';
                
                // 重置标签筛选
                filterTags.forEach(tag => {
                    if (tag.textContent === '全部标签') {
                        tag.classList.add('active');
                    } else {
                        tag.classList.remove('active');
                    }
                });
                
                // 重置下拉筛选
                document.querySelectorAll('.form-select').forEach(select => {
                    select.selectedIndex = 0;
                });
                
                // 重置排序
                sortOptions.forEach((option, index) => {
                    if (index === 0) {
                        option.classList.add('active');
                    } else {
                        option.classList.remove('active');
                    }
                });
            });
            
            // 应用筛选按钮
            document.querySelector('.btn-primary').addEventListener('click', function() {
                // 收集所有筛选条件
                const searchText = document.querySelector('.search-input').value;
                const selectedTags = Array.from(document.querySelectorAll('.filter-tag.active'))
                    .map(tag => tag.textContent);
                const contentType = document.querySelector('.form-select').value;
                
                console.log('应用筛选条件:', {
                    searchText,
                    selectedTags,
                    contentType,
                    // 可以添加其他筛选条件
                });
                
                // 模拟加载状态
                this.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 筛选中...';
                this.disabled = true;
                
                setTimeout(() => {
                    this.innerHTML = '<i class="fas fa-search"></i> 应用筛选';
                    this.disabled = false;
                    alert('已应用筛选条件，共找到 1,286 个符合条件的树洞');
                }, 1000);
            });
            
            // 搜索框回车键提交
            document.querySelector('.search-input').addEventListener('keypress', function(e) {
                if (e.key === 'Enter') {
                    document.querySelector('.btn-primary').click();
                }
            });
            
            // 收藏按钮功能
            const bookmarkButtons = document.querySelectorAll('.action-btn:has(.far.fa-bookmark)');
            
            bookmarkButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    
                    if (icon.classList.contains('far')) {
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        alert('已收藏该树洞');
                    } else {
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        alert('已取消收藏');
                    }
                });
            });
        });
    </script>
</body>
</html>
    
